package com.crm.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.crm.base.ResponseResult;
import com.crm.domain.dto.BusinessRecordDto;
import com.crm.domain.entity.Business;
import com.crm.domain.entity.BusinessRecord;
import com.crm.mapper.BusinessRecordMapper;
import com.crm.service.IBusinessRecordService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 沟通记录表 服务实现类
 */
@RequiredArgsConstructor
@Service
public class BusinessRecordServiceImpl extends ServiceImpl<BusinessRecordMapper, BusinessRecord> implements IBusinessRecordService {
    private final BusinessRecordMapper businessRecordMapper;

    /**
     * 插入数据到沟通记录表
     * @param business
     */
    @Override
    public void addInfo(Business business) {
        BusinessRecord record = BeanUtil.copyProperties(business, BusinessRecord.class);
         businessRecordMapper.insert(record);
    }
}
